package com.example.up;

/**
 * Created by yinghao on 2017/2/10.
 * Email：yhaowa@outlook.com
 * <p>
 * 根据当前网络状况获取合适分片大小
 * <p>
 * 稳定后分片大小动态增加至速度和成功率之间的一个平衡点
 * <p>
 * 2048倍数~
 */

public class BlockSize {

    //枚举化分片
    private static final double[] BLOCK_SIZE = new double[]{
            0.5 * 1024 * 1024, 1024 * 1024, 2 * 1024 * 1024, 3 * 1024 * 1024, 4 * 1024 * 1024
    };


    private static int BLOCKSIZE = 3 * 1024 * 1024;


    public static int getBlockSize() {
        return BLOCKSIZE;
    }

    public static void setBlockSize(int blockSize) {
        BLOCKSIZE = blockSize;
    }


}
